<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    449. Serialize and Deserialize BST
   </h1>
   <p>
    Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer environment.
   </p>
   <p>
    Design an algorithm to serialize and deserialize a
    <b>
     binary search tree
    </b>
    . There is no restriction on how your serialization/deserialization algorithm should work. You just need to ensure that a binary search tree can be serialized to a string and this string can be deserialized to the original tree structure.
   </p>
   <p>
    <b>
     The encoded string should be as compact as possible.
    </b>
   </p>
   <p>
    <b>
     Note:
    </b>
    Do not use class member/global/static variables to store states. Your serialize and deserialize algorithms should be stateless.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    449. 序列化和反序列化二叉搜索树
   </h1>
   <p>
    序列化是将数据结构或对象转换为一系列位的过程，以便它可以存储在文件或内存缓冲区中，或通过网络连接链路传输，以便稍后在同一个或另一个计算机环境中重建。
   </p>
   <p>
    设计一个算法来序列化和反序列化
    <strong>
     二叉搜索树
    </strong>
    。 对序列化/反序列化算法的工作方式没有限制。 您只需确保二叉搜索树可以序列化为字符串，并且可以将该字符串反序列化为最初的二叉搜索树。
   </p>
   <p>
    <strong>
     编码的字符串应尽可能紧凑。
    </strong>
   </p>
   <p>
    <strong>
     注意
    </strong>
    ：不要使用类成员/全局/静态变量来存储状态。 你的序列化和反序列化算法应该是无状态的。
   </p>
  </div>
 </body>
</html>